
\documentclass{l3deliverable}


\usepackage{url}
\usepackage{testcasedescription}%

\title{Maintenance Report}



%%authors
\author{ Melissa Campbell\\
Bilal Hamid\\
Jessica Bell\\
Tsvetelina Valcheva\\
John Martin
}

%%release date 
\date{\today}
\deliverableID{D8.4}
\project{PSD3 Group Exercise 2}
\team{E}
\version{1.1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Standard section for all documents

\section{Introduction}
This document aims to outline the maintenance performed on the DemoSocs Voting System. The document consists of a short description identifying the changes to the implementation and any assumptions which were made. Revised class diagrams will also be included along with the maintenance approach taken.

\subsection{Identification}

D8.4 is the Maintenance Report of the Level 3 Professional Software Development Team E.

\subsection{Related Documentation}

The documents related to the Maintenance Report are listed below.
\begin{list}{}{}
\item PSD3 Group Exercise Description \
  \url{http://fims.moodle.gla.ac.uk/}
  
\item D1: Team Management Document \
  \url{Team Google Documents Folder}
  
\item D2: Project Plan \
  \url{Team Google Documents Folder}
  
\item D3: Requirements Document \
  \url{Team Google Documents Folder}
  
\item D4: Prototyping Report\
  \url{Team Google Documents Folder}
  
\item D7: Implementation of DemoSocs Voting System \\
  \url{http://code.google.com/p/psd-team-project/}
  
\end{list}
 

\subsection{Purpose and Description of Document}

This is a short maintenance report describing changes made to the DemoSocs Voting System providing a justification on the each change. It identifies any assumptions which the team made. Included in the document are revised diagrams to accommodate the new requirements. This deliverable will also require the JavaDocs and modified source code to be re-submitted. \\


\subsection{Document Status and Schedule}
The final revision of this document was completed by the 5th of March. This is version 1.1 of the Maintenance Report.


\section{Perfective Maintenance} % Tsvetelina, this is perfective maintenance. The name is a bit confusing.

During the maintenance perfective maintenance was conducted which is concerned with the introduction of new features to the system at the request of a client, or the improvement of the system's non-functional characteristics.

% Election System
\subsubsection{Election System}
\includegraphics[scale=0.7]{ElectionSystemModified.jpeg}

\textbf{Rationale}\\ \\
Using the Factory pattern two new electoral systems were created -
Referendum and Alternative Vote. Similarly, two new types of votes
were created - RankedVote for the Alternative Vote and ReferendumVote
for the Referendum. The two new types of votes were needed because
they incorporate different information and functionality from the current OneOFNVote; RankedVote contains a map of preferences, whilst ReferendumVote contains an option (yes or no)
that the voter has chosen. Additional validation had to be
incorporated in the code to stop users from nominating for a referendum,
as well correctly redirecting the create command to the appropriate election system \\

\textbf{Assumptions}
\\ The following assumptions were made whilst implementing the new requirements:
\begin{itemize}
\item A referendum consists of a question and two options to vote for, either yes or no. A refendum result could either return yes, no or tie.
\item No nominations for a referendum are allowed.
\item A vote cast for an AV election cast have multiple candidates listed in order of preference.
\end{itemize}


\subsubsection{Election Object}
\includegraphics[scale=0.7]{ElectionObject.jpeg}  %here new diagram

A new interface ReferendumResult extends Option. ReferendumResultImpl
does not have to deal with a Candidate object, instead it returns the referendum result. As such it was more logical for the design to have it as a separate class rather than representing a referendum as a Simple Plurality election.

\section{Corrective Maintenance}

After extensive testing the team has discovered a few bugs, mostly to
do with lack of input validation, multiple print statements when only
one is needed. As a result we also performed corrective maintenance remove these defects. \\

The following bugs were found and corrected during maintenance:
\begin{itemize}
\item Votes could be cast for candidates not in the electorate set when creating the election.
\item Once an election had been published, its state did not change to published.
\item Many print statements were displaying the same output.
\end{itemize}

The above bugs were relatively easy to identify and correct. They mainly consisted in adding extra if statements to make sure the command is not performed unless the input is valid.


\end{document}
